#!/bin/sh

# INSTALLPREFIX="/users/someuser/cmailguard"
#
# This would cerate the lib directory in the directory listed above

INSTALLPREFIX="%%MGPATH%%/mailguard"


if [ ! -n "$INSTALLPREFIX" ]; then
  echo "It would be a good idea to set the INSTALLPREFIX variable.\
  Check the README.txt guide in the directory root."
  exit 1
fi


tar zxvf Convert-ASN1-0.20.tar.gz
cd Convert-ASN1-0.20
perl Makefile.PL PREFIX=$INSTALLPREFIX
make
make test
make install
cd ..


tar zxvf Mail-Sendmail-0.79.tar.gz
cd Mail-Sendmail-0.79
perl Makefile.PL PREFIX=$INSTALLPREFIX
make
make test
make install
cd ..


tar zxvf MailTools-1.74.tar.gz
cd MailTools-1.74
perl Makefile.PL PREFIX=$INSTALLPREFIX
make
make test
make install

cd ..


tar zxvf MIME-Lite-3.01.tar.gz
cd MIME-Lite-3.01
perl Makefile.PL PREFIX=$INSTALLPREFIX
make
make test
make install

cd ..

tar zxvf MLDBM-2.01.tar.gz
cd MLDBM-2.01
perl Makefile.PL PREFIX=$INSTALLPREFIX
make
make test
make install


cd ..

tar zxvf perl-ldap-0.33.tar.gz
cd perl-ldap-0.33
perl Makefile.PL PREFIX=$INSTALLPREFIX
make
make test
make install

cd ..
tar zxvf XML-Simple-2.16.tar.gz
cd XML-Simple-2.16
perl Makefile.PL PREFIX=$INSTALLPREFIX
make
make test
make install

